<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:cc="http://java.sun.com/jsf/composite/composite"
      xmlns:w="http://com.googlecode/whiteboard">
<ui:composition template="/templates/centredPageLayout.xhtml">
    <ui:define name="center">
        <p:fieldset legend="New Whiteboard">
            <p:messages/>
            <h:form id="mainForm" prependId="false">
                <h:panelGrid columns="2" id="whiteboardPanel" columnClasses="whiteboardCol1,whiteboardCol2"
                             footerClass="whiteboardFooter">
                    <cc:requiredLabel for="wbTitle" value="Whiteboard title"/>
                    <p:inputText id="wbTitle" value="#{createWhiteboard.title}" required="true"
                                 label="Whiteboard title"/>
                    <cc:requiredLabel for="wbUserName" value="User name"/>
                    <p:inputText id="wbUserName" value="#{createWhiteboard.creator}" required="true"
                                 label="User name"/>
                    <h:outputLabel value="Whiteboard width" for="wbWidth"/>
                    <h:panelGroup>
                        <p:spinner id="wbWidth" min="0" max="9999" suffix="px" value="#{createWhiteboard.width}"
                                   label="Whiteboard width" maxlength="4">
                            <w:pixelConverter/>
                        </p:spinner>
                        <h:outputLabel value="Whiteboard height" for="wbHeight"
                                       style="margin-left: 10px; margin-right: 10px;"/>
                        <p:spinner id="wbHeight" min="0" max="9999" suffix="px" value="#{createWhiteboard.height}"
                                   label="Whiteboard height" maxlength="4">
                            <w:pixelConverter/>
                        </p:spinner>
                    </h:panelGroup>
                    <!--
                    <h:outputLabel for="transport" value="Select transport"/>
                    <h:selectOneMenu id="transport" value="#{createWhiteboard.pubSubTransport}" style="width: 110px;">
                        <f:selectItems value="#{createWhiteboard.transports}"/>
                    </h:selectOneMenu>
                    -->
                    <f:facet name="footer">
                        <p:captcha label="Captcha"/>
                        <p:commandButton id="dialogButton" value="Create and Start Drawing!" ajax="false"
                                         action="#{createWhiteboard.create}"/>
                    </f:facet>
                </h:panelGrid>
                <p:focus for="wbTitle"/>
            </h:form>
        </p:fieldset>
    </ui:define>
    <ui:define name="resources">
        <h:outputStylesheet library="css" name="startdialog.css"/>
    </ui:define>
</ui:composition>
</html>